package com.example.administrator.myapp;

import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 15-6-18.
 */
public class Thrid extends AppCompatActivity {
    private ViewPager viewById;
    private List<ImageView> list;

    @Override
    public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState) {
        super.onCreate(savedInstanceState, persistentState);
        setContentView(R.layout.activity_thrid);
        viewById = (ViewPager) findViewById(R.id.view);
        list = new ArrayList<>();
        initView();
    }

    private void initView() {
//        for (int i = 1; i <= 3; i++) {
//            ImageView imageView = new ImageView(this);
//            ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
//            int mipmap = getResources().getIdentifier("bg_guide_0" + i, "mipmap", getPackageName());
//            imageView.setLayoutParams(layoutParams);
//            imageView.setImageResource(mipmap);
//            list = new ArrayList<>();
//
//        }
        try {
            SharedPreferences versionCode = getSharedPreferences("ifFrist", MODE_PRIVATE);
            boolean aBoolean = versionCode.getBoolean("boolean", true);
            PackageInfo packageInfo = this.getPackageManager().getPackageInfo(getPackageName(), 0);
            int Code = packageInfo.versionCode;
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }
    }

}
